home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
util
/
libs
/
cwrlib31.lha
/
cwrite.doc
< prev
next >
Wrap
Text File
|
1992-07-22
|
9KB
|
293 lines
TABLE OF CONTENTS
cwrite.library/CWrite
cwrite.library/CWriteAlloc
cwrite.library/CWriteCloseWindow
cwrite.library/CWriteCursorType
cwrite.library/CWriteFree
cwrite.library/CWriteInit
cwrite.library/CWriteOpenWindow
cwrite.library/CWriteSetColors
cwrite.library/CWrite cwrite.library/CWrite
NAME
CWrite -- Writes bytes containing CSI sequences to a window.
SYNOPSIS
CWrite( CwrData, buffer, length )
A0 A1 D0
VOID CWrite(struct CwrData *, UBYTE *, LONG);
FUNCTION
CWrite() writes bytes of data to the window contained in the CwrData
structure. 'length' indicates the length of data to be written;
'buffer' is a pointer to the buffer to be written.
The data written to the window may contain ANSI escape sequences
as used on standard PC-type computers.
I.e. 0x1b[1;31;40m but not 0x9b1;31;40m as normally used on the
Amiga computer.
This means, that characters not normally visible when written to the
console.device will be visible when written with this function.
An example could be characters within the ascii code range 128 to 160
There are, however, some control codes that are not written to the
screen; read the README file for further documentation on that.
Be sure to use CWriteInit() before attempting to use this function.
INPUTS
CwrData - pointer to an initialized CwrData structure
buffer - pointer to the buffer
length - integer
RESULTS
None.
SEE ALSO
CWriteAlloc(), CWriteCursorType(), CWriteFree(), CWriteInit()
cwrite.library/CWriteAlloc cwrite.library/CWriteAlloc
NAME
CWriteAlloc -- Allocates memory for the CWrite functions.
SYNOPSIS
Cdata = CWriteAlloc()
D0
struct CwrData *CWriteAlloc(void)
FUNCTION
CWriteAlloc() is used to allocate memory for the CWrite functions.
Never deallocate memory by yourself, that is allocated by this
function, use CWriteFree().
It is advisable not to allocate memory by yourself, as the data
structure might change in size in future releases.
Before using this pointer to the CWrite functions, you must first
initialize it using the CWriteInit() library function.
RESULTS
Cdata - pointer to a CwrData structure
error - if zero, the memory needed for the CwrData structure could
not be allocated.
SEE ALSO
CWriteFree(), CWriteInit()
cwrite.library/CWriteCloseWindow cwrite.library/CWriteCloseWindow
NAME
CWriteCloseWindow -- Closes a window opened by CWriteOpenWindow.
SYNOPSIS
CWriteCloseWindow( window )
A0
VOID CWriteCloseWindow( struct Window * );
FUNCTION
CWriteCloseWindow() closes both the window and the screen contained
in the window structure.
Be sure that you don't use this function on a window opened on the
workbench screen, as it will try to close this screen too.
INPUTS
window - pointer to a Window structure
RESULTS
None.
SEE ALSO
CWriteOpenWindow()
cwrite.library/CWriteCursorType cwrite.library/CWriteCursorType
NAME
CWriteCursorType -- Changes the cursortype in a CwrData structure.
SYNOPSIS
CWriteCursorType( CwrData, type )
A0 D0
VOID CWriteCursorType(struct CwrData *, UBYTE);
FUNCTION
CWriteCursorType() changes the cursortype in a CwrData structure to
another kind of cursortype.
The initial cursortype, as of after using the CWriteInit function,
is allways of type CURSORTYPE_NONE.
Currently supported are two different cursortypes, or no cursor at
all.
The CURSORTYPE_FAST cursortype has been made to be the fastest
available, but may also cause troubles, if your program have more
than one window opened on the current screen, as it writes directly
into the first bitplane of the rastport, and will therefore also
write into other windows opened on the screen. This cursortype will
allways be 8 pixels wide, without taking care of the X-size of the
font. It will, however, follow the size in the Y direction.
Do not use this cursortype if you possibly can avoid it!
The CURSORTYPE_SLOW cursortype uses the intuition.library functions
SetDrMode() and RectFill() to write the cursor, and is ofcourse
much slower than the CURSORTYPE_FAST. - It shouldn't, however, cause
any troubles on a screen with more than one window opened. This
cursortype will allways follow the font size, no matter how high or
wide that size might be.
The routines for this cursortype has been heavily improved, and
it is almost as fast as the CURSORTYPE_FAST cursortype routines.
This is the recommended cursortype. Please avoid the CURSORTYPE_FAST
cursortype if you can.
The CURSORTYPE_NONE turns the cursor completely off.
The CURSORTYPE_GHOSTED will 'ghost' the cursor, just like the OS2
console.device.
This cursortype will use the same routines as the CURSORTYPE_SLOW,
and is using the SetDrMode() and RectFill() routines from the
intuition.library as well as CURSORTYPE_SLOW does.
Use this cursortype, if your window goes in 'INACTIVEWINDOW' mode.
Other values will have the same effect as CURSORTYPE_NONE.
INPUTS
CwrData - pointer to an initialized CwrData structure
type - byte value
RESULTS
None.
SEE ALSO
CWriteInit()
cwrite.library/CWriteFree cwrite.library/CWriteFree
NAME
CWriteFree - Frees memory allocated by the CWriteAlloc function.
SYNOPSIS
CWriteFree( Cdata )
A0
VOID CWriteFree( struct CwrData * );
FUNCTION
CWriteFree() frees memory allocated by the CWriteAlloc() function.
RESULTS
None.
SEE ALSO
CWriteAlloc()
cwrite.library/CWriteInit cwrite.library/CWriteInit
NAME
CWriteInit -- Initializes a structure for use in CWrite.
SYNOPSIS
CWriteInit( CwrData, window )
A0 A1
VOID CWriteInit(struct CwrData *, struct Window *);
FUNCTION
CWriteInit() initializes a CwrData structure to use by the CWrite
and CWriteCursorType functions.
It MUST be called before attempting to use CWrite()!
Be sure, that the memory for the CwrData structure are allocated
properly, by using the CWriteAlloc() routine, or else you might get
very weird results.
The window MUST be borderless, as the very fast scrolling routines
in the library will not work properly if it isn't.
INPUTS
CwrData - pointer to a CwrData structure
window - pointer to a window
RESULTS
None.
SEE ALSO
CWrite(), CWriteCursorType(), CWriteFree(), CWriteOpenWindow()
cwrite.library/CWriteOpenWindow cwrite.library/CWriteOpenWindow
NAME
CWriteOpenWindow -- Opens a screen and a borderless window.
SYNOPSIS
window = CWriteOpenWindow(title, width, height, planes, interlace)
D0 A0 D0 D1 D2 D3
struct Window *CWriteOpenWindow( UBYTE *, int, int, int, BOOL );
FUNCTION
CWriteOpenWindow() opens a screen with title 'title', width 'width',
height 'height' in 'planes' bitplanes. If the 'interlace' is non-zero
the screen will be opened in interlace mode.
If the opening of the screen is succesfull, the function will open
a window slightly smaller than the screen, to make sure that the
window starts right below the title bar of the screen.
The IDCMPFlags of the window, are at the time being RAWKEY and
MENUPICK, but they may be altered using the intuition function
ModifyIDCMP().
The window opened will always be borderless, as all windows should
be when using this library.
After successful opening of the screen and window, the library will
automatically call the CWriteSetColors() function, to make sure that
the correct ANSI colors will be used.
If you decide not to use the library routine CWriteOpenWindow(),
you must take care of two things:
1. The window may _NOT_ go behind the titlebar of the screen.
- To make sure of this, you can define the TopEdge member of
the newwindow structure to start at a value of 10. - This is
the offset used in the CWriteOpenWindow() function.
2. The window _MUST_ be borderless.
- The very fast scroll routines in the library will not work
properly if it isn't.
INPUTS
title - pointer to a nullterminated string
width - integer
height - integer
planes - integer
interlace - BOOL value of either zero or one
RESULTS
window - pointer to the opened Window.
error - if zero, the window or screen could not be opened.
SEE ALSO
CWriteCloseWindow(), CWriteSetColors()
cwrite.library/CWriteSetColors cwrite.library/CWriteSetColors
NAME
CWriteSetColors -- Changes colors to standard ANSI colors.
SYNOPSIS
CWriteSetColors( window )
A0
VOID CWriteSetColors(struct Window *);
FUNCTION
CWriteSetColors() sets the colors in the viewport to the standard
ANSI colors used by this library.
According to how many bitplanes you have on the current screen,
this function will change all colors available to the standard
ANSI colors, as used by this library.
INPUTS
window - pointer to a Window structure
RESULTS
None.
SEE ALSO
CWriteOpenWindow()